<?php
namespace Azalea;
$app = Bootstrap::init('../etc/config.ini');
define('REQUEST_TIME', TIME);
define('DOCPATH', DOCROOT);
define('SYSPATH', APPROOT);
define('VARPATH', APPROOT . '../var');
define('CNFPATH', APPROOT . '../etc');
define('LIBPATH', APPROOT . 'lib');
define('VIEWS', APPROOT . 'views');
// define('PROTOCOL', (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http');
define('PROTOCOL', 'https');
Loader::load(APPROOT . 'lib/common.php');

Loader::load(APPROOT . 'lib/trait.bpf.php');
Loader::load(APPROOT . 'lib/trait.api.php');
Loader::load(APPROOT . 'lib/controller.bpf.php');
Loader::load(APPROOT . 'lib/controller.admin.php');
Loader::load(APPROOT . 'lib/controller.api.php');

Loader::load(APPROOT . 'lib/model.bpf.php');
Loader::load(APPROOT . 'lib/model.service.php');

$app->run();